class Content < ActiveRecord::Base
  belongs_to :article
  acts_as_list :scope => :article
  
  validates_presence_of :body
  
  def self.sortable(sequence)
    sequence.each do |id|
      Content.find(id).update_attribute(:position, sequence.index(id))
    end
  end
end
